package com.zsk.mapper;

import com.zsk.entity.RoleEntity;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author keke
 * @since 2020-07-23
 */
public interface RoleEntityMapper extends BaseMapper<RoleEntity> {

    @Select("SELECT * FROM role_entity where role_code in (SELECT role_code FROM user_role_entity where user_name=#{userName})")
    public List<RoleEntity> listUserRoles(String userName);
}
